From e93e958d244729c300e5132fe9d5107e5668b1f8 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Wed, 3 Sep 2025 14:36:54 +0100 Subject: [PATCH] Check for duplicate entries Origin: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4ce27cc826bf90cc8dbbd8a8c87bd913cccd7ec0 Bug-Debian: https://bugs.debian.org/1117853 Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2025-52885 Gbp-Pq: Name Check-for-duplicate-entries.patch --- poppler/StructTreeRoot.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc index 99ddbfe..f7a2794 100644 --- a/poppler/StructTreeRoot.cc +++ b/poppler/StructTreeRoot.cc @@ -137,6 +137,10 @@ void StructTreeRoot::parseNumberTreeNode(Dict *node) } int keyVal = key.getInt(); std::vector &vec = parentTree[keyVal]; + if (!vec.empty()) { + error(errSyntaxError, -1, "Nums item at position {0:d} is a duplicate entry for key {1:d}", i, keyVal); + continue; + } Object valueArray = nums.arrayGet(i + 1); if (valueArray.isArray()) { -- 2.30.2